# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Contributor: Kevin Daudt <kdaudt@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=copyq
_pkgname=CopyQ
pkgver=3.12.0
pkgrel=0
pkgdesc="Clipboard manager with searchable and editable history"
url="https://github.com/hluk/CopyQ"
arch="all"
license="GPL-3.0-or-later"
makedepends="cmake libxfixes-dev libxtst-dev qt5-qtscript-dev
	qt5-qtsvg-dev qt5-qttools-dev qt5-qtx11extras-dev"
options="!check" # upstream does not provide check
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/hluk/$_pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

prepare() {
	default_prepare
	mkdir "$builddir"/build
}

build() {
	cd "$builddir"/build
	cmake .. \
		-DWITH_QT5=TRUE \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr
	make
}

package() {
	cd "$builddir"/build
	make DESTDIR="$pkgdir" install
}

sha512sums="0e3b8b432f463acf93464980ef1d4349c600e40fc9fcc7fdbb19b9205ed54a5052fc7b1bc91a0927d7f78c71cd9669331bf3d725617bfea2f105f16b7d80f77c  copyq-3.12.0.tar.gz"
